#include "GlobalAI.h"
#include "ExternalAI/aibase.h"

std::set<IGlobalAI*> ais;

DLL_EXPORT int GetGlobalAiVersion()
{
	return GLOBAL_AI_INTERFACE_VERSION;
}

DLL_EXPORT void GetAiName(char* name)
{
	strcpy(name,AI_NAME);
}
DLL_EXPORT IGlobalAI* GetNewAI()
{
	TTAICore* ai=new TTAICore;
	ais.insert(ai);
	return ai;
}
DLL_EXPORT void ReleaseAI(IGlobalAI* i)
{
	delete (TTAICore*)i;
	ais.erase(i);
}
DLL_EXPORT int GetModVer() 
{
	return MODV;
}
DLL_EXPORT char* GetAiNameInaczej(int)
{
	return strcpy(new char[sizeof(AI_NAME)],AI_NAME);
}